package Rules;

import Logic.GameEngine;

public class GameEnd extends BoardRule {
	
	private int finishedPlayers;
	

	public GameEnd(GameEngine ge, int finishedPlayers) {
		super(ge);
		this.finishedPlayers = finishedPlayers;
	}


	@Override
	public void executeRule() {
		if (ge.getPlayersInGoal().size() >= finishedPlayers) {
			ge.setGameEnd(true);
		}

	}

}

